package com.example.demo.jdbc.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.List;

public interface MyBaseMapper<T> extends BaseMapper<T> {
    
    int insertBatchSomeColumn(List<T> entityList);
    
    int alwaysUpdateSomeColumnById(@Param(Constants.ENTITY) T entity);
    
    int deleteByIdWithFill(T entity);
    
    boolean existsById(Serializable id);
    
    boolean exists(@Param(Constants.WRAPPER) Wrapper<T> wrapper);
    
    int saveBatch(List<T> entityList);
    
    int save(@Param(Constants.ENTITY) T entity);
}